import './index.scss'
export default ngModule => {
    ngModule.component('timeLine', {
        template: require('./index.html'),
        bindings: {
            timeLineData: '=',
            activeNode: '='
        },
        controllerAs: 'vm',
        controller($scope, $compile, $timeout) {
            this.$onInit = ()=>{
                console.log(this.timeLineData)
            }
            this.selected = (item)=>{
                this.activeNode = item.value;
                let top = $('#'+item.value).offset().top;
                $('html, body').animate({scrollTop: top}, "slow");
            }
            console.log(this.timeLineData,$scope.timeLineData)
        }
    })
}